import requests


def movie(start):
    url = 'https://movie.douban.com/j/chart/top_list'
    headers = {
        'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36'
    }
    param = {
        "type": "24",
        "interval_id": "100:90",
        "start": start,
        "limit": 20
    }
    response = requests.get(url, param, headers=headers)
    print(response.request.url)
    print(response.status_code)
    print(response.json())
    print(response.text)
    response.close()
    return response.text


start_ = 0
while start_ < 100:
    start_ += 20
    movie(start_)
